package top.riske.animalhazardassessment.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class Animal {

    @TableId(type = IdType.AUTO)
    private Long id;

    @Schema(description = "姓名")
    private String name;

    @Schema(description = "物种")
    private String species;

    @Schema(description = "性别，0-未知，1-男，2-女")
    private Integer gender;

    @Schema(description = "生日")
    private LocalDate birthday;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "动物主人ID")
    @TableField(value = "owner_id")
    private Long ownerId;

    @Schema(description = "动物主人")
    @TableField(exist = false)
    private Account owner;

    @Schema(description = "省")
    private String province;

    @Schema(description = "市")
    private String city;

    @Schema(description = "区/县")
    private String district;

    @Schema(description = "详细地址")
    private String location;

    @Schema(description = "维度,不需要传递，根据地址自动解析")
    private String lng;

    @Schema(description = "经度,不需要传递，根据地址自动解析")
    private String lat;

    @Schema(description = "动物描述")
    private String description;

    @Schema(description = "风险指数，实际值应该除以100")
    @TableField(value = "risk_point")
    private Long riskPoint;

    @TableField(value = "status")
    private Integer status;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @TableLogic
    private Boolean deleted;


}
